//
//  LPReportExameFailShowViewController.m
//  ShangHaiHuDongApp
//
//  Created by 刘应平 on 2017/8/23.
//  Copyright © 2017年 刘应平. All rights reserved.
//

#import "LPReportExameFailShowViewController.h"
#import "LPChooseReportTypeViewController.h"
@interface LPReportExameFailShowViewController ()
/**  重新报到按钮  */
@property (strong, nonatomic) UIButton  *sureButton;
/**  label   */
@property (strong, nonatomic) UILabel  *examLabel;
/**  提示  */
@property (strong, nonatomic) UILabel  *shenheLabel;

@end

@implementation LPReportExameFailShowViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.titlelabel.text = @"审核结果";
    
    
//    [self.view addSubview:self.shenheLabel];
//    self.shenheLabel.sd_layout
//    .leftSpaceToView(self.view, 30 * [UIScreen zj_screenWScale])
//    .rightSpaceToView(self.view, 30 * [UIScreen zj_screenWScale])
//    .heightIs(20 * [UIScreen zj_screenHScale])
//    .topSpaceToView(self.view, LP_TopHeight + 20 * [UIScreen zj_screenHScale]);
    
    
    
    [self.view addSubview:self.examLabel];
    self.examLabel.text = self.EXAMINERESULT;
    CGFloat height = [CalculateLabelHeight CalculateLabelHeightWithString:self.EXAMINERESULT font:15 * [UIScreen zj_textFontScale] width:[UIScreen zj_screenWith] - 40 * [UIScreen zj_screenWScale]].height + 16 * [UIScreen zj_screenHScale];
    self.examLabel.sd_layout
    .leftSpaceToView(self.view, 30 * [UIScreen zj_screenWScale])
    .rightSpaceToView(self.view, 30 * [UIScreen zj_screenWScale])
    .heightIs(height)
    .topSpaceToView(self.view,30 * [UIScreen zj_screenHScale] + LP_TopHeight);
    
    
    
    [self.view addSubview:self.sureButton];
    self.sureButton.sd_layout
    .leftSpaceToView(self.view, 60 * [UIScreen zj_screenWScale])
    .rightSpaceToView(self.view, 60 * [UIScreen zj_screenWScale])
    .heightIs(40 * [UIScreen zj_screenHScale])
    .bottomSpaceToView(self.view, 90 * [UIScreen zj_screenHScale]);
    
}


- (void)clickButton{
    LPChooseReportTypeViewController *vc = [LPChooseReportTypeViewController new];
    vc.registerModel = self.model;
    [self.navigationController pushViewController:vc animated:YES];

}

- (UIButton *)sureButton{
    if (!_sureButton) {
        _sureButton = ({
            UIButton *button = [UIButton new];
            [button setTitle:@"重新报到" forState:UIControlStateNormal];
            [button setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
            button.titleLabel.font = LYPFONT(16);
            button.backgroundColor = [UIColor themeColor];
            [button addTarget:self action:@selector(clickButton) forControlEvents:UIControlEventTouchUpInside];
            button.layer.cornerRadius = 6;
            button.layer.masksToBounds = YES;
            
            button;

            
        });
    }
    return _sureButton;
}

- (UILabel *)examLabel{
    if (!_examLabel) {
        _examLabel = ({
            UILabel *label = [UILabel new];
            label.textAlignment = NSTextAlignmentCenter;
            label.textColor = [UIColor textGrayColor];
            label.backgroundColor = [UIColor clearColor];
            label.numberOfLines = 0;
            label.font = LYPFONT(15);
            label;
        });
    }
    return _examLabel;
}


- (UILabel *)shenheLabel{
    if (!_shenheLabel) {
        _shenheLabel = ({
            UILabel *label = [UILabel new];
            label.textAlignment = NSTextAlignmentLeft;
            label.textColor = [UIColor textBlackColor];
            label.backgroundColor = [UIColor clearColor];
            label.font = LYPFONT(16);
            label.text = @"审核未通过原因:";
            label;
        });
    }
    return _shenheLabel;
}


@end
